using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class goldThief : soldier
{
    void Start()
    {
        UdpPlatform=GameObject.Find("UdpServer");
        transform.parent.gameObject.GetComponent<CircleCollider2D>().radius*=1.5f;
    }

    // Update is called once per frame
    void FixedUpdate()
    {
        transform.rotation = transform.parent.rotation;
        transform.localPosition=localPos;
        if(Health<=0)
        {
            if(PlayerId==UdpPlatform.GetComponent<WebSocketDemo>().PlayerId)
                Destroy(gameObject);
            else
                Health=1;
        }
    }

    void OnDestroy()
    {
        transform.parent.gameObject.GetComponent<CircleCollider2D>().radius/=1.5f;
        
    }
}
